home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / gnumake / gmake362.zoo / diffs < prev    next >
Text File  |  1992-07-27  |  13KB  |  579 lines

  1. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  2. +++ arscan.c    1992/01/24 20:00:48
  3. @@ -25,7 +25,11 @@
  4.  #define PORTAR 1
  5.  #endif
  6.  
  7. +#ifdef atarist
  8. +#include <gnu-ar.h>
  9. +#else
  10.  #include <ar.h>
  11. +#endif
  12.  #include <stdio.h>
  13.  #include <sys/types.h>
  14.  #include <sys/stat.h>
  15. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  16. +++ commands.c    1992/01/24 20:00:48
  17. @@ -342,6 +342,7 @@
  18.       int sig;
  19.  {
  20.    signal (sig, SIG_DFL);
  21. +#ifndef atarist
  22.  #ifndef USG
  23.    (void) sigsetmask (0);
  24.  #endif
  25. @@ -387,6 +388,7 @@
  26.      wait_for_children (0, 1);
  27.  
  28.    /* Delete any non-precious intermediate files that were made.  */
  29. +#endif /* atarist */
  30.  
  31.    remove_intermediates (1);
  32.  
  33. --- 1.3.1.1    1991/12/29 16:09:12
  34. +++ default.c    1992/01/24 20:00:48
  35. @@ -28,9 +28,14 @@
  36.     `.s' must come last, so that a `.o' file will be made from
  37.     a `.c' or `.p' or ... file rather than from a .s file.  */
  38.  
  39. +#ifdef atarist
  40.  static char default_suffixes[]
  41. +  = ".out .a .o .c .cc .y .l .s .S .h .info .dvi .tex .texinfo .sh .elc .el";
  42. +#else
  43. +static char default_suffixes[]
  44.    = ".out .a .ln .o .c .cc .C .p .f .F .r .y .l .s .S \
  45.  .mod .sym .def .h .info .dvi .tex .texinfo .texi .cweb .web .sh .elc .el";
  46. +#endif
  47.  
  48.  static struct pspec default_pattern_rules[] =
  49.    {
  50. @@ -48,6 +53,13 @@
  51.  
  52.  static struct pspec default_terminal_rules[] =
  53.    {
  54. +#ifdef atarist
  55. +    /* RCS.  */
  56. +    "%", "RCS/%",        /* This is for RCS 5.6 */
  57. +    "test -f $@ || $(CO) $(COFLAGS) $< $@",
  58. +    "%", "RCS/%,v",
  59. +    "test -f $@ || $(CO) $(COFLAGS) $< $@",
  60. +#else
  61.      /* RCS.  */
  62.      "%", "%,v",
  63.      "test -f $@ || $(CO) $(COFLAGS) $< $@",
  64. @@ -59,6 +71,7 @@
  65.      "$(GET) $(GFLAGS) $<",
  66.      "%", "SCCS/s.%",
  67.      "$(GET) $(GFLAGS) $<",
  68. +#endif
  69.  
  70.      0, 0, 0
  71.    };
  72. --- 1.1.1.3    1991/12/29 16:09:12
  73. +++ dir.c    1992/06/10 20:54:58
  74. @@ -50,6 +50,12 @@
  75.  #define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
  76.  #endif /* POSIX */
  77.  
  78. +#ifdef atarist
  79. +#define HASH_LIMIT 8    /* only consider this many characters of file names */
  80. +static short _limit = 0;
  81. +#endif
  82. +
  83. +
  84.  /* Hash table of directories.  */
  85.  
  86.  struct directory
  87. @@ -97,12 +103,20 @@
  88.    register char *p;
  89.    register struct directory *dir;
  90.  
  91. +#ifdef atarist
  92. +  for (p = name, _limit = HASH_LIMIT; *p != '\0' && _limit-- > 0; ++p)
  93. +#else
  94.    for (p = name; *p != '\0'; ++p)
  95. +#endif
  96.      HASH (hash, *p);
  97.    hash %= DIRECTORY_BUCKETS;
  98.  
  99.    for (dir = directories[hash]; dir != 0; dir = dir->next)
  100. +#ifdef atarist
  101. +    if (DOS_streq (dir->name, name))
  102. +#else
  103.      if (streq (dir->name, name))
  104. +#endif
  105.        break;
  106.  
  107.    if (dir == 0)
  108. @@ -164,7 +178,11 @@
  109.      /* Checking if the directory exists.  */
  110.      return 1;
  111.  
  112. +#ifdef atarist
  113. +      for (p = filename,_limit = HASH_LIMIT; *p != '\0' && _limit-- > 0; ++p)
  114. +#else
  115.        for (p = filename; *p != '\0'; ++p)
  116. +#endif
  117.      HASH (hash, *p);
  118.        hash %= DIRFILE_BUCKETS;
  119.  
  120. @@ -171,7 +189,11 @@
  121.        /* Search the list of hashed files.  */
  122.  
  123.        for (df = dir->files[hash]; df != 0; df = df->next)
  124. +#ifdef atarist
  125. +    if (DOS_streq (df->name, filename))
  126. +#else
  127.      if (streq (df->name, filename))
  128. +#endif
  129.        return !df->impossible;
  130.      }
  131.  
  132. @@ -191,10 +213,13 @@
  133.        if (!REAL_DIR_ENTRY (d))
  134.      continue;
  135.  
  136. +#ifdef atarist
  137. +      for (i = 0, _limit = HASH_LIMIT; i < D_NAMLEN(d) && _limit-- > 0; ++i)
  138. +#else
  139.        for (i = 0; i < D_NAMLEN(d); ++i)
  140. +#endif
  141.      HASH (newhash, d->d_name[i]);
  142.        newhash %= DIRFILE_BUCKETS;
  143. -
  144.        df = (struct dirfile *) xmalloc (sizeof (struct dirfile));
  145.        df->next = dir->files[newhash];
  146.        dir->files[newhash] = df;
  147. @@ -202,8 +227,13 @@
  148.        df->impossible = 0;
  149.  
  150.        /* Check if the name matches the one we're searching for.  */
  151. -      if (filename != 0
  152. -      && newhash == hash && streq (d->d_name, filename))
  153. +      if (filename != 0 && newhash == hash 
  154. +#ifdef atarist
  155. +      && DOS_streq (d->d_name, filename)
  156. +#else
  157. +      && streq (d->d_name, filename)
  158. +#endif
  159. +                    )
  160.      return 1;
  161.      }
  162.  
  163. @@ -269,7 +299,12 @@
  164.        filename = p = dirend + 1;
  165.      }
  166.  
  167. +#ifdef atarist
  168. +  _limit = HASH_LIMIT;
  169. +  for (hash = 0; *p != '\0' && _limit-- > 0; ++p)
  170. +#else
  171.    for (hash = 0; *p != '\0'; ++p)
  172. +#endif
  173.      HASH (hash, *p);
  174.    hash %= DIRFILE_BUCKETS;
  175.  
  176. @@ -318,12 +353,21 @@
  177.      /* There are no files entered for this directory.  */
  178.      return 0;
  179.  
  180. +#ifdef atarist
  181. +  _limit = HASH_LIMIT;
  182. +  for (hash = 0; *p != '\0' && _limit-- > 0; ++p)
  183. +#else
  184.    for (hash = 0; *p != '\0'; ++p)
  185. +#endif
  186.      HASH (hash, *p);
  187.    hash %= DIRFILE_BUCKETS;
  188.  
  189.    for (next = dir->files[hash]; next != 0; next = next->next)
  190. +#ifdef atarist
  191. +    if (DOS_streq (filename, next->name))
  192. +#else
  193.      if (streq (filename, next->name))
  194. +#endif
  195.        return next->impossible;
  196.  
  197.    return 0;
  198. @@ -399,3 +443,44 @@
  199.      printf ("%u", impossible);
  200.    printf (" impossibilities in %u directories.\n", dirs);
  201.  }
  202. +
  203. +#ifdef atarist
  204. +/* checks to see if two names refer to the same file */
  205. +int DOS_streq(name1, name2)
  206. +char *name1, *name2;
  207. +{
  208. +    static char _name1[64], _name2[64];
  209. +    char *lastslash;
  210. +    extern char *rindex();
  211. +    int i;
  212. +
  213. +    if (!strcmp(name1, name2)) return 1;
  214. +
  215. +    unx2dos(name1, _name1);
  216. +    unx2dos(name2, _name2);
  217. +
  218. +    name1 = rindex(_name1, '\\'); if (!name1) name1 = _name1;
  219. +    name2 = rindex(_name2, '\\'); if (!name2) name2 = _name2;
  220. +    for(i = 8; i>0; i--) {
  221. +        if (*name1 != *name2) return 0;
  222. +        if (*name1 == 0)
  223. +            return 1;
  224. +        if (*name1 == '.')
  225. +            goto doext;
  226. +        name1++; name2++;
  227. +    }
  228. +
  229. +/* now look for extension */
  230. +    while (*name1 && *name1 != '.') name1++;
  231. +    while (*name2 && *name2 != '.') name2++;
  232. +    if (*name1 != *name2) return 0;
  233. +doext:
  234. +    name1++; name2++;
  235. +    for (i = 3; i > 0; i--) {
  236. +        if (*name1 != *name2) return 0;
  237. +        if (!*name1) return 1;
  238. +        name1++; name2++;
  239. +    }
  240. +    return 1;
  241. +}
  242. +#endif /* atarist */
  243. --- 1.1.1.1.1.1    1991/12/29 16:09:12
  244. +++ function.c    1992/01/24 20:00:50
  245. @@ -351,6 +351,9 @@
  246.      else
  247.        error_prefix = "";
  248.  
  249. +#ifdef atarist
  250. +    perror_with_name (error_prefix, "function not allowed under TOS");
  251. +#else
  252.      if (pipe (pipedes) < 0)
  253.        {
  254.          perror_with_name (error_prefix, "pipe");
  255. @@ -444,6 +447,7 @@
  256.  
  257.      pop_signals_blocked_p ();
  258.  
  259. +#endif /* atarist */
  260.      free (text);
  261.      break;
  262.        }
  263. --- 1.1.1.2.1.1    1991/12/29 16:09:12
  264. +++ job.c    1992/01/25 18:06:16
  265. @@ -24,7 +24,11 @@
  266.  #include <errno.h>
  267.  
  268.  /* Default path to search for executables.  */
  269. +#ifdef atarist
  270. +static char default_path[] = ";/bin";
  271. +#else
  272.  static char default_path[] = ":/bin:/usr/bin";
  273. +#endif
  274.  
  275.  /* Default shell to use.  */
  276.  char default_shell[] = "/bin/sh";
  277. @@ -87,10 +91,20 @@
  278.  
  279.  #else    /* WTERMSIG not defined and have <sys/wait.h> or not USG.  */
  280.  
  281. +#ifdef atarist
  282. +#  define WAIT_T int
  283. +#  define WTERMSIG(x) 0
  284. +#  define WCOREDUMP(x) 0
  285. +#  define WEXITSTATUS(x)  x
  286. +#  define WIFSIGNALED(x) (WTERMSIG (x) != 0)
  287. +#  define WIFEXITED(x) (WTERMSIG (x) == 0)
  288. +#  undef WAIT_NOHANG
  289. +#else
  290.  #define WAIT_T union wait
  291.  #define WTERMSIG(x)    ((x).w_termsig)
  292.  #define WCOREDUMP(x)    ((x).w_coredump)
  293.  #define WEXITSTATUS(x)    ((x).w_retcode)
  294. +#endif /* atarist */
  295.  #ifndef    WIFSIGNALED
  296.  #define    WIFSIGNALED(x)    (WTERMSIG(x) != 0)
  297.  #endif
  298. @@ -205,7 +219,9 @@
  299.  #else    /* Not USG.  */
  300.  
  301.    /* Block the signals.  */
  302. +#ifndef atarist
  303.    (void) sigblock (fatal_signal_mask | sigmask (SIGCHLD));
  304. +#endif /* atarist */
  305.  
  306.  #endif
  307.  
  308. @@ -226,7 +242,9 @@
  309.  #else    /* Not USG.  */
  310.  
  311.    /* Unblock the signals.  */
  312. +#ifndef atarist
  313.    (void) sigsetmask (sigblock (0) & ~(fatal_signal_mask | sigmask (SIGCHLD)));
  314. +#endif
  315.  
  316.  #endif
  317.  
  318. @@ -654,6 +672,7 @@
  319.    
  320.    /* Set up a bad standard input that reads from a broken pipe.  */
  321.  
  322. +#ifndef atarist
  323.    if (bad_stdin == -1)
  324.      {
  325.        /* Make a file descriptor that is the read end of a broken pipe.
  326. @@ -667,6 +686,7 @@
  327.        bad_stdin = pd[0];
  328.      }
  329.      }
  330. +#endif
  331.  
  332.    /* Decide whether to give this child the `good' standard input
  333.       (one that points to the terminal or whatever), or the `bad' one
  334. @@ -827,6 +847,7 @@
  335.    if (stdout_fd != 1)
  336.      (void) dup2 (stdout_fd, 1);
  337.  
  338. +#ifndef atarist
  339.    /* Free up file descriptors.  */
  340.    {
  341.      register int d;
  342. @@ -834,6 +855,7 @@
  343.      for (d = 3; d < max; ++d)
  344.        (void) close (d);
  345.    }
  346. +#endif /* atarist */
  347.  
  348.    /* Don't block signals for the new process.  */
  349.    unblock_signals ();
  350. @@ -850,6 +872,60 @@
  351.  search_path (file, path, program)
  352.       char *file, *path, *program;
  353.  {
  354. +#ifdef atarist
  355.